<!DOCTYPE html>
<html>

<head>
	<meta charset="UTF-8">
	<title>期号管理</title>
	<link rel="stylesheet" href="../css/common2.css">
	<style>
		.one {
			width: 9%;
		}

		.four {
			width: 81%;
		}

		.three {
			width: 9%;
		}

		.long-background-img {
			width: 120px;
			height: 35px;
			margin-left: 2%;
			background: url("../image/enter_longer.png") no-repeat center center !important;
		}
	</style>
</head>

<body>
	<div class="grouping" id="vue-root" style="margin-top:20px ;">
		<div class="add">
			<a href="educational_term_item.html" style="color: white">添加期号</a>
		</div>
		<div class="refresh" onclick="location.reload()">刷新</div>

		<div class="class_back" onclick="history.back()"></div>
		<div class="table">
			<table class="table_top">
				<thead>
					<tr>
						<th class="one">
							<input type="checkbox" class="check-box" v-model="all">序号
						</th>
						<th class="four">期号名称</th>
						<th class="three">编辑/删除</th>
					</tr>
				</thead>
				<tbody id="list">
					<tr v-for="(term,index) in list" :key="term.id">
						<td class="one">
							<input type="checkbox" class="check-box" v-model="term.checked">
							<span v-text="index+1"></span>
						</td>
						<td class="four" v-text="term.name"></td>
						<td class="three">
							<div class="option">
								<div class="edit-icon option-icon">
									<a :href="'educational_term_item.html?id='+term.id"
										style="left: 20%; top:30%;position: absolute;">
										<img class="img" src="../image/edit.png" height="20" width="20"
											onmouseover="this.src='../image/edit_light.png'"
											onmouseout="this.src='../image/edit.png'">
									</a>
								</div>
								<div class="delete-icon option-icon" @click="del([term.id])"
									style="right: 20%; top:30%;position: absolute;">
									<img class="img" src="../image/delete.png" height="20" width="20"
										onmouseover="this.src='../image/delete_light.png'"
										onmouseout="this.src='../image/delete.png'">
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
		</div>
		<br>
		<div class="delete long-background-img">
			<a onclick="history.back()" style="color: white">返回成绩列表</a>
		</div>
		<div class="delete" @click="batchDelete" v-if="total>1">批量删除</div>
		<ul class="pagination" v-if="pages>1">
			<li>
				<a v-if="pageNum!=1" @click="pageNum=1">«</a>
				<a class="pages-jump" v-if="pageNum!=1" @click="pageNum--">‹</a>
				<a v-text="pageNum"></a>
				<a class="pages-jump" v-if="pageNum!=pages" @click="pageNum++">›</a>
				<a v-if="pageNum!=pages" @click="pageNum=pages">»</a>
			</li>
		</ul>
	</div>

	<script src="/scriptZIP/qs.min.js"></script>
	<script src="/scriptZIP/vue.min.js"></script>
	<script src="/scriptZIP/axios.min.js"></script>
	<script src="/js/common.js"></script>
	<script src="/js/list.js"></script>

	<script>

		var app = new Vue(merge({
			data: {
				urls: {
					del: '/pc/term/del',
					list: '/pc/term/list/' + top_params().id
				}
			}
		}));
	</script>

</body>

</html>